/*
 *  SyncIT , easy synchronization of files between computers and devices.
 *  Copyright (C) 2011  Christian Masus <cmasus(at)gmail.com>
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version. If redistributing and/or modifying
 *  this file, this notice must be included in the redistributed or
 *  modified copy.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package log;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * Class to hold stuff for a log element.
 * @author Christian Masus
 *
 */
public class LogMsg {

	private LogMsg prev;
	private LogMsg next;
	private Date date;
	private String type;
	private String message;

	public LogMsg(Date date, String type, String message) {
		this.prev = null;
		this.next = null;
		this.date = date;
		this.type = type;
		this.message = message;
	}

	public LogMsg getPrev() {
		return prev;
	}
	public void setPrev(LogMsg prev) {
		this.prev = prev;
	}

	public LogMsg getNext() {
		return next;
	}
	public void setNext(LogMsg next) {
		this.next = next;
	}

	public Date getDate() {
		return date;
	}

	public String getType() {
		return type;
	}

	public String getMessage() {
		return message;
	}

	public String toString() {
		SimpleDateFormat format = new SimpleDateFormat("dd.MM.yyyy hh:mm:ss:SSS");
		return "Date=" + format.format(date) + ", type=" + type + ", message=" + message;
	}
}
